<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('退回审核')"/>
    <link th:href="@{/ajax/libs/bootstrap-tagsinput/tagsinput.css}" rel="stylesheet">
    <link th:href="@{/ajax/libs/jQuery-ui/jquery-ui.css}" rel="stylesheet">

</head>
<style>
    .bootstrap-tagsinput > input {
        display: none;
    }
</style>

<body style="background-color: #F4F6FA">
<div class="main-content" style="margin: 0;padding: 0">

    <form id="form-user-add" class="form-horizontal"  style="background-color: #F4F6FA">
        <input type="hidden" name="pkId" th:value="${sendBack.pkId}" >
        <input type="hidden" name="getDealPK" th:value="${sendBack.getDealPk}" >
        <input type="hidden" name="wfId" th:value="${sendBack.wfId}" >
        <div class="col-sm-12" style="display: flex">
            <div class="col-sm-12 entering-page">
                <!--    操作窗口    -->
                <div class="col-sm-12 tltieBoder">
                    <div class="blueBorder"></div>
                    <h4 style="margin:0 0 0 10px">操作窗口-退回审核</h4>
                </div>
                <!-- 工单编号,工单性质..-->
                <div class="col-sm-12 work-top">
                    <div class="form-group col-sm-4">
                        <label>工单编号</label>
                        <input th:value="${formBase.workFormNo}" type="text" name="workFormNo" value="123" class="form-control" id="workNumber"
                               placeholder="请输入名称">
                    </div>
                    <div class="form-group col-sm-4">
                        <label>工单性质</label>
                        <select th:value="${formBase.setProName}" name="setProName" id="workCharacter" class="form-control m-b phoneCategory">
                            <option value="">-请选择-</option>
                            <option value="11" selected>普通工单</option>
                            <option value="21">督办工单</option>
                            <option value="31">呈批工单</option>
                        </select>
                    </div>
                    <div class="form-group col-sm-4">
                        <label>工单主题</label>
                        <input th:value="${formBase.wsTopic}" type="text" name="wsTopic" class="form-control" id="workSubject" placeholder="请输入名称">
                    </div>
                    <div class="form-group col-sm-4">
                        <label class="is-required">交办次序<span style="color: red">*</span></label>
                        <select name="seqName" th:value="${sendBack.seqName}" id="workOrder" class="form-control m-b phoneCategory">
                            <option value="">-请选择-</option>
                            <option value="1">投诉</option>
                            <option value="2">建议</option>
                            <option value="3" selected>表扬</option>

                        </select>
                    </div>
                    <div class="form-group col-sm-4">
                        <label>办理时间</label>
                        <input th:field="${sendBack.backLimit}" name="backLimit" type="text" class="form-control reply" id="reply" placeholder="请输入名称">
                    </div>
                    <div class="form-group col-sm-4">
                        <label>承办单位<span style="color: red">*</span></label>
                        <input type="text" th:value="${sendBack.sbdeptName}" name="sbdeptName" class="form-control" id="workUnit" placeholder="请输入名称">
                        <div class="input-group-append " style="position: absolute;top: 35px;right: 30px;">
                            <span class="glyphicon glyphicon-list-alt" style="color: #206ef7"></span>
                        </div>
                    </div>
                    <div class="form-group col-sm-4">
                        <label>办理性质<span style="color: red">*</span></label>
                        <input th:value="${sendBack.sortName}" name="sortName" type="text" class="form-control" id="transactionNature" placeholder="请输入名称">
                    </div>
                    <div class="form-group col-sm-4">
                        <label is-required>回复时间</label>
                        <input type="text" th:value="${sendBack.backTime}" name="backTime" class="form-control workTime" id="workTime" placeholder="请输入名称">
                    </div>
                    <div class="form-group col-sm-4">
                        <label is-required>负责部门</label>
                        <input type="text" th:value="${sendBack.bdutyDept}" name="bdutyDept" class="form-control workTime" id="department" placeholder="请输入名称">
                    </div>
                    <div class="form-group col-sm-4">
                        <label is-required>联系电话</label>
                        <input type="text" th:value="${sendBack.bdutyTel}" name="bdutyTel" class="form-control workTime" id="contactphone" placeholder="请输入名称">
                    </div>


                </div>
                <!--回复内容-->
                <div class="col-sm-6">
                    <div class="col-sm-8">
                        <div class="form-group">
                            <label class="col-xs-12 entering-pd">回复内容：</label>

                            <textarea th:value="${sendBack.backDesc}" name="backDesc" maxlength="1000" class="form-control workRemark" rows="3"
                                      style="height: 150px"></textarea>
                            <span>还可以输入<i class="workRemarkI">1000</i>个文字</span>

                        </div>
                    </div>

                </div>
                <!--退回理由-->
                <div class="col-sm-6">
                    <div class="col-sm-8">
                        <div class="form-group">
                            <label class="col-xs-12 entering-pd">退回理由：</label>

                            <textarea th:value="${sendBack.backRemark}" name="backRemark" maxlength="1000" class="form-control returnReason" rows="3"
                                      style="height: 150px"></textarea>
                            <!--                            <span>还可以输入<i class="workRemarkI">1000</i>个文字</span>-->
                            <span>退单理由，特殊说明等</span>

                        </div>
                    </div>

                </div>
                <!--审查结论-->
                <div class="col-sm-12 tltieBoder">
                    <div class="blueBorder"></div>
                    <h4 style="margin:0 0 0 10px">审查结论</h4>
                </div>
                <div class="col-sm-12">
                    <div class="col-sm-12">
                        <div class="form-group col-sm-12"
                             style="display: flex;flex-direction: row;flex-wrap: wrap;align-items: center">
                            <label class="col-sm-12">审查意见</label>
                            <div class="col-sm-4">
                                <input name="sendRemark" th:value="${sendBack.sendRemark}"  type="text" class="form-control reviewComment" id="reviewComment"
                                       placeholder="请输入名称">
                            </div>

                            <span class="col-sm-2">(同意或不同意)</span>
                        </div>
                        <div class="form-group col-sm-12">
                            <label class="col-sm-12" style="color: orange">不通过理由</label>
                            <div class="col-sm-4">
                                <input  type="text" class="form-control disapprove col-sm-8" id="disapprove"
                                       placeholder="请输入名称">
                                <input type="hidden" id="backState" name="backState" value="0">
                            </div>
                        </div>
                    </div>
                </div>
                <!--按钮-->
                <div class="col-sm-12" style="display: flex;justify-content: space-around;margin-bottom: 10px;">
                    <div class="col-sm-4" style="display: flex;justify-content: space-evenly;">
                        <button type="button" onclick="submitHandler(11)" class="btn btn-info">通过</button>
                        <button type="button" onclick="submitHandler(22)" class="btn btn-success">不通过</button>
                        <button type="button" class="btn btn-light" onclick="$.modal.close()">关闭</button>
                    </div>
                </div>

            </div>


        </div>

    </form>


</div>

<script th:src="@{/ajax/libs/layui/laydate.js}"></script>
<th:block th:include="include :: footer"/>
<script th:src="@{/ajax/libs/jquery-jqPaginator/jqPaginator.js}"></script>
<script th:src="@{/ajax/libs/bootstrap-tagsinput/tagsinput.min.js}"></script>
<script th:src="@{/ajax/libs/jQuery-ui/jquery-ui.js}"></script>
<script th:src="@{/js/deptdiag.js}"></script>


<script>
    var prefix = ctx + "system/sendBack";
    let pkId = $('#pkId').val();
        let telId = $('#getDealPk').val();

    function submitHandler(val) {
        $("#backState").val(val)
        if ($.validate.form()) {
            let data = $('#form-user-add').serializeArray();
            $.operate.save(prefix + '/examine', data);
        }
    }
</script>
</body>
</html>

